﻿using Sidvall.Data;

namespace Sidvall.IdentityManager.UI.Entities
{
    public sealed partial class UserConfiguration
    {
        #region Public Members

        #region OnAfterImport

        partial void OnAfterImport(UserConfiguration destination, UserConfiguration source, CopySettings copySettings)
        {
            destination.ImportCustomFields(source);
        }

        #endregion
        #region ClearCustomFields

        public void ClearCustomFields()
        {
            if (this.ServerItems != null)
                this.ServerItems.ClearCustomFields();
        }

        #endregion
        #region ImportCustomFields

        public void ImportCustomFields(UserConfiguration source)
        {
            if (source == null)
                return;
            if (this.ServerItems != null)
                this.ServerItems.ImportCustomFields(source.ServerItems);
        }

        #endregion

        #endregion
    }
}